package test;

public class WXpay implements Pay {
    private double m  = 200.0;  // 初始余额

    public void pay(double money) {
        if (m  >= money) {
            System.out.println("微信支付" + money + "元");
            m  -= money;
            System.out.println("支付成功！当前余额为：" + m );
        } else {
            System.out.println("余额不足");
        }
    }

    public double getBalance() {
        return m ;
    }
}

